﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace MultiAnnotatedRegex.machine {
	class ConcatMachine<Tag> : CompoundMachine<Tag> {
		public override void Append(Machine<Tag> m) {
			var oldLast = Children.Last();
			base.Append(m);
			var newLast = m;

			oldLast.ClearOutoing();
			oldLast.ConnectTo(newLast);
			newLast.ConnectTo(Accept);
		}
	}
}
